<!-- 头部"关注"组件 -->
<template>
    <div class="content mt40">
        <newsHome/>
        <div class="newsList">
            <ul>
                <li v-for="(item, index) in arrList" :key="index">
                    <a href="javascript:;">
                        <h2>{{index+1}} .{{item.title}}</h2>
                        <p>{{item.detail}}</p>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
import newsHome from "@/components/news/newsHome";
export default {
  data() {
    return {
      arrList: []
    };
  },
  mounted() {
    this.fetchData();
  },
  components: {
    newsHome
  },
  methods: {
    fetchData() {
      var _this = this;
      this.$http
        .get("src/data/follow.data")
        .then(function(res) {
          _this.arrList = res.data;
        })
        .catch(function(err) {
          console.log(err);
        });
    }
  }
};
</script>
<style scoped>
.mt40 {
  margin-top: 40px;
}
</style>